#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "New.h"
#pragma once


typedef struct array2d {
	const struct TypeDescriptor *type;
	void *start;
	int hight;
	int length;
	int size;
} arr;


void *find (arr *a, int coord_length, int coord_hight);
void recreate (int hight, int length, arr *a, size_t siz);
void copy_paste (arr *a, arr *b, int pos_1, int pos_2);

static void *ctor_2d (void *_self, va_list *app) {
	arr *self=_self;
	self->hight=va_arg(*app,int);
	self->length=va_arg(*app,int);
	self->size=va_arg(*app,int);
	self->start=malloc(self->hight*self->length*self->size);
    return self;
}

static void *dtor_2d(void *_self) {
        arr *self=_self;
		free(self->start);
        return self;
}
static const struct TypeDescriptor _arr = {
	sizeof(arr),
    ctor_2d,
    dtor_2d
};



